﻿[output_none]


	<!-- CMS Settings -->
		[var:'CMS_site_path'='/SHoebox/admin/']
		[var:'CMS_site_admin_path_url'='http://' + (Server_Name) + $CMS_site_path]
		[var:'CMS_site_upload_path'='/SHoebox/upload']
		[var:'CMS_template'='default']
		[var:'CMS_defaultlanguage'='NL']
		[var:'CMS_linkbaseurl'=(response_filepath)]
		[library: $CMS_site_path + 'cms_backend.lasso']


	<!-- Create a new CMS object -->
		[var:'myCMS'=shp_CMS()]

	
	<!-- Get the current language -->
		[var:'mylang'=(Encode_SQL:(Action_Param:'l'))]
		[if:($mylang)=='']
			[var:'mylang'=$CMS_defaultlanguage]
		[/if]
		[$myCMS->getLang(-l=$mylang)]

	
	<!-- Get the current page -->
		[var:'mypage'=(Encode_SQL:(Action_Param:'p'))]
		[if:($mypage)=='']
			[$myCMS->getPage('1')]
		[/if]
		[$myCMS->getPage($mypage)]


	<!-- Get the output format/template -->
		[var:'myFormat'=(Encode_SQL:(Action_Param:'f'))]
		[Select: ($myFormat)]
			[Case('popup')]
				[var:'myTemplate'=$CMS_site_path + 'templates/' + $CMS_template + '/popup.lasso']
			[Case('html')]
				[var:'myTemplate'=$CMS_site_path + 'templates/' + $CMS_template + '/index.lasso']
			[Case('imgselector')]
				[var:'myTemplate'=$CMS_site_path + 'templates/' + $CMS_template + '/imgselector.lasso']
			[Case]
				[var:'myTemplate'=$CMS_site_path + 'templates/' + $CMS_template + '/index.lasso']
		[/Select]


	<!-- Get the menus -->
	
		[var:'sql_home_menu'='
			SELECT		*
			FROM 		SHb_menus
			INNER JOIN	SHb_translations_menus ON SHb_translations_menus._k2_menuid = SHb_menus._k1_menuid
			INNER JOIN	SHb_languages ON SHb_languages._k1_languageid = SHb_translations_menus._k2_languageid
			WHERE 		SHb_languages.language = \'' + $mylang + '\'
			AND			SHb_menus._k2_pagetypeid = 0']
		[Inline: -InlineName='Get_home_menu', -database='SHoebox', -sql=$sql_home_menu][/Inline] 
	
	
	
		[var:'sql_top_menus'='
			SELECT		*
			FROM 		SHb_menus
			INNER JOIN	SHb_translations_menus ON SHb_translations_menus._k2_menuid = SHb_menus._k1_menuid
			INNER JOIN	SHb_languages ON SHb_languages._k1_languageid = SHb_translations_menus._k2_languageid
			WHERE 		SHb_languages.language = \'' + $mylang + '\'
			AND			SHb_menus._k2_parentid = 1
			AND	NOT		SHb_menus._k2_pagetypeid = 0
			ORDER BY	SHb_menus._k2_parentid, SHb_menus._k1_menuid']
		[Inline: -InlineName='Get_top_menus', -database='SHoebox', -sql=$sql_top_menus][/Inline] 
	

[/output_none]
[Include: $myTemplate]
